Let us go back where we stopped developing our mapping techniques yesterday: Our Corona Map. This is just a super short repetition of what was just presented. No worries, we’re going to have some time to improve your maps.
Recreate a simple Covid-19 map as already created yesterday but use ggplot2 this time.
They don’t have to perfectly match but:
# For importing the data, you can ue this code:
library(dplyr)
library(sf)
attributes_districts <- read.csv("./data/attributes_districts.csv",
header = T, fill = T, sep = ",")
german_districts_enhanced <- st_read(dsn = "./data",
layer = "GER_DISTRICTS") %>%
rename(., district_id = id) %>%
st_transform(., crs = 3035) %>%
left_join(., attributes_districts, by = "district_id")
Now we want to add another layer to see if enough hospitals are located in the Covid-19 high risk zones of Germany.
For an extra challenge: The hospital shapefile contains information on the number of beds in each hospital. Can you change the size of hospital dots according to the number of beds?
Make sure that the CRS of your hospital layer is defined correctly!
You need to define size = beds as aethetics of the new layer.
The variable beds is a character but needs to be numeric.